package cn.edu.scau.dormitory_management_system.enums;

/**
 * @author djc
 * @date 2021/8/7
 * @time 21:45
 */
public enum ExceptionMsgEnum {
    NO_MATCH_DB_TABLE(551, "数据库缺少表匹配"),
    /**
     * 这里是系统造成的异常
     */
    EXPORT_FAILURE(551, "FileUtil.downloadFile中出现异常"),
    POI_UTIL_FAILURE(551, "PoiUtil中出现异常"),
    CREATE_FILE_ERROR(551,"新建Excel文件错误"),
    CLOSE_IO_UTIL_ERROR(551, "IO工具类关闭异常"),
    COMPRESS_ERROR(551,"压缩文件错误"),
    CATCH_FILE_INPUT_STREAM_ERROR(551, "获取文件输入流错误"),
    NO_FOUND_MATCH_TYPE(551, "找不到匹配的类型"),
    IMPORT_DATA_TO_SQL_ERROR(551, "数据导入数据库错误"),

    /**
     * 这里是用户造成的异常
     */
    NO_CHOSE_IMPORT_FILE(552, "未选中导入文件"),
    FILE_FORMAT_ERROR(553, "文件内容格式错误");

    private int code;
    private String msg;

    ExceptionMsgEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
